package com.cryptoneedle.garden.service.garden.sync;

import com.cryptoneedle.garden.constant.DorisConstant;
import com.cryptoneedle.garden.service.garden.ads.AdsSyncService;
import com.cryptoneedle.garden.service.garden.doris.DorisSyncService;
import com.cryptoneedle.garden.service.garden.dwd.DwdSyncService;
import com.cryptoneedle.garden.service.garden.mapping.MappingSyncService;
import com.cryptoneedle.garden.service.garden.ods.OdsSyncService;
import com.cryptoneedle.garden.service.util.ConfigUtil;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

/**
 * <p>description:  </p>
 *
 * @author CryptoNeedle
 * @date 2025-11-14
 */
@Service
public class SyncDorisService {

    @Resource
    private SyncDorisService syncDorisService;

    @Resource
    private DorisSyncService dorisSyncService;
    @Resource
    private MappingSyncService mappingSyncService;
    @Resource
    private OdsSyncService odsSyncService;
    @Resource
    private DwdSyncService dwdSyncService;
    @Resource
    private AdsSyncService adsSyncService;

    @Resource
    private ConfigUtil configUtil;

    public void syncDoris() {
        String internalCatalog = DorisConstant.DEFAULT_CATALOG;
        dorisSyncService.syncDoris(internalCatalog);
        mappingSyncService.syncMapping(internalCatalog, configUtil.mapping());
        odsSyncService.syncOds(internalCatalog, configUtil.ods());
        dwdSyncService.syncDwd(internalCatalog, configUtil.dwd());
        adsSyncService.syncAds(internalCatalog, configUtil.ads());
    }
}